Skip to content

Conversation

@Cycloctane
Copy link
Member

@Cycloctane Cycloctane commented Oct 29, 2025

What do these changes do?

Forks cannot use codspeed account, which can make benchmark job in ci fail if aiohttp contributors want to run test workflow on their forks. This pr make unnecessary steps skip if triggered workflow is not in the main repository.

Are there changes in behavior for the user?

aiohttp contributors can now run github action workflows to test changes in their forks without unnecessary errors.

Is it a substantial burden for the maintainers to support this?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES/ folder

@Cycloctane Cycloctane requested a review from webknjaz as a code owner October 29, 2025 06:23
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 29, 2025

CodSpeed Performance Report

Merging #11737 will not alter performance

Comparing Cycloctane:skip-workflows-in-forks (6dc6b3e) with master (72fadb8)

Summary

✅ 59 untouched

@Cycloctane Cycloctane requested a review from asvetlov as a code owner October 29, 2025 06:49
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 29, 2025
@Cycloctane Cycloctane changed the title Skip codecov uploads and benchmarks in ci when running in forks Skip codecov uploads and benchmarks in ci when running in fork repositories Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.74%. Comparing base (a091c73) to head (947f356).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11737      +/-   ##
==========================================
+ Coverage   98.72%   98.74%   +0.02%     
==========================================
  Files         127      127              
  Lines       43754    43754              
  Branches     2328     2328              
==========================================
+ Hits        43196    43205       +9     
+ Misses        395      389       -6     
+ Partials      163      160       -3     
Flag Coverage Δ
CI-GHA 98.61% <ø> (+0.01%) ⬆️
OS-Linux 98.35% <ø> (+0.01%) ⬆️
OS-Windows 96.68% <ø> (ø)
OS-macOS 97.57% <ø> (+<0.01%) ⬆️
Py-3.10.11 97.12% <ø> (+<0.01%) ⬆️
Py-3.10.19 97.61% <ø> (ø)
Py-3.11.14 97.81% <ø> (ø)
Py-3.11.9 97.32% <ø> (ø)
Py-3.12.10 97.43% <ø> (ø)
Py-3.12.12 97.92% <ø> (ø)
Py-3.13.9 98.17% <ø> (+0.68%) ⬆️
Py-3.14.0 98.12% <ø> (+0.76%) ⬆️
Py-3.14.0t 97.19% <ø> (ø)
Py-pypy3.11.13-7.3.20 97.41% <ø> (?)
VM-macos 97.57% <ø> (+<0.01%) ⬆️
VM-ubuntu 98.35% <ø> (+0.01%) ⬆️
VM-windows 96.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@webknjaz
Copy link
Member

The preferred solution is storing the plain text token fore Codecov. As for codspeed, I haven't seen it failing. Do you have any examples?

FWIW, the repo checks should be done through repo IDs.

@Cycloctane Cycloctane changed the title Skip codecov uploads and benchmarks in ci when running in fork repositories Skip benchmarks in ci when running in fork repositories Oct 29, 2025
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, though, if benchmarking could still run but just skip uploading the results, conditionally. Could you check?

@webknjaz
Copy link
Member

webknjaz commented Nov 5, 2025

I wonder, though, if benchmarking could still run but just skip uploading the results, conditionally. Could you check?

@Cycloctane have you been able to check if this is possible?

@Cycloctane
Copy link
Member Author

Cycloctane commented Nov 16, 2025

Sorry for the delay. I've checked codspeed docs. Benchmarking can be done separately with pytest-codespeed. But codspeed's github action does not to support skipping uploading.

Codspeed token seems not necessary for public repository. We can safely remove it.

@Cycloctane
Copy link
Member Author

pypy test is failing. Because pyo3 has dropped support for pypy3.10.

@webknjaz webknjaz force-pushed the skip-workflows-in-forks branch from 6eba1d0 to 947f356 Compare November 21, 2025 16:40
@webknjaz
Copy link
Member

Benchmarking can be done separately with pytest-codespeed. But codspeed's github action does not to support skipping uploading.

Alright, this is blocked on CodSpeedHQ/action#146, then.

Codspeed token seems not necessary for public repository. We can safely remove it.

Sounds good.

@webknjaz webknjaz added backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot labels Nov 21, 2025
Comment on lines +494 to +500
needs:
- build-tarball
- build-wheels
- pre-setup # transitive, for accessing settings
runs-on: ubuntu-latest
if: >-
needs.pre-setup.outputs.upstream-repository-id == github.repository_id
Copy link
Member

@webknjaz webknjaz Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this to a separate PR?

Copy link
Member

@webknjaz webknjaz Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, never mind. It's kinda related but the PR title+description+change note should reflect this.

uses: CodSpeedHQ/action@v4
with:
mode: instrumentation
token: ${{ secrets.CODSPEED_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aparrently, they've implemented OIDC two days ago. Perhaps, we could configure it as a part of replacing this token: https://codspeed.io/docs/integrations/ci/github-actions/configuration#oidc-recommended

@webknjaz webknjaz force-pushed the skip-workflows-in-forks branch from 947f356 to 6dc6b3e Compare November 21, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants